package com.mall.core;

import java.io.Serializable;
import java.util.ArrayList;

import com.mall.util.StringWrapper;
//Represents an Inventory.
//Store in the Shopping Mall use the inventory to store Items.
//The Inventory collaborates with the ArrayList to accomplish its task.

public interface Inventory extends Serializable {
public void setStoreId(int storeid);//The id of the store the inventory belongs to
public int getStoreOwnerId();//The id of the store the inventory belongs to
public void setStoreOwnerId(int storeonerid);//The id of the store the inventory belongs to
public int getStoreId();//The id of the store the inventory belongs to
	public boolean addaNewItemEntry(Item newitem);// Add a new item Entry to
													// the inventory

	public boolean addNewItems(ArrayList<Item> items);// Add a new item Entry
														// List of Items to the
														// Inventory

	public boolean FindItem(Item item);// Find an Item By specifying the item

	public boolean FindItemById(int index);// Find an Item By specifying the
											// index of the Item


	public boolean deleteItem(Item item);// Delete an Item from the Inventory by

	public boolean deleteItem(int index);// Delete an Item from the Inventory by
											// specifying an Index


	public int getItemIndex(Item item);// Get the index of the Item

	public ArrayList<StringWrapper> getItemData(Item item);// Get a list of the
															// Data of an Item
															// By SpecyFying the
															// Item

	public ArrayList<StringWrapper> getItemData(int index);// Get a list of the
															// Item Data From
															// the Inventory by
															// Specifying the Id

	public Item getItem(int index);// Retrieves an Item From the Inventory By
									// It's Id

	public Item getItem(Item item);// Retrieves an Item by specifying the item
									// in the inventory

	public boolean updateItemData(Item item,StringWrapper property, StringWrapper value);// Update an
																	// Item in
																	// the
																	// Inventory

	public boolean updateItemDataById(int index,StringWrapper property, StringWrapper value);// Update
																		// a set
																		// of
																		// Items
																		// in an
																		// Inventory

	public int getSize();// Returns the Size of the Inventory
}
